/**
 * 
 */
package com.ls.lserp.modules.order.dao;

import java.math.BigDecimal;
import java.util.List;

import com.ls.lserp.common.persistence.CrudDao;
import com.ls.lserp.common.persistence.annotation.MyBatisDao;
import com.ls.lserp.dbaccess.Entity.InventoryChangeImperfectDetailEntity;
import com.ls.lserp.dbaccess.Entity.StyleQualityControlEntity;
import com.ls.lserp.modules.order.entity.*;


/**
 * 订单DAO接口
 * @author zq
 * @version 2016-10-31
 */
@MyBatisDao
public interface ReworkDao extends CrudDao<OrderRework> {

	/**
	 * 获取返工信息
	 * @param orderRework
	 * @return
	 */
	public OrderRework findReworkInfo(OrderRework orderRework);
	/**
     * 获取订单信息
     * @param order
     * @return
     */
    public List<StyleQualityControlEntity> findItemList(OrderRework orderRework);
    
    /**
     * 保存换片信息
     * @param order
     * @return
     */
    public int insertChangeImperfect(InventoryChangeImperfectDetailEntity changeImperfectEntity);
    
    /**
     * 获取库存数量
     * @param materialId
     * @return
     */
    public BigDecimal getInventoryQuantity(long materialId);
    
    /**
     * 获取料头数量
     * @param materialId
     * @return
     */
    public BigDecimal getRemainQuantity(long materialId);
}
